<%--
  Created by IntelliJ IDEA.
  User: TianyuChen
  Date: 2020/4/2
  Time: 13:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    $(function(){
        $('#role_edit_submit').bind('click', function(){
            $('#role_edit_form').form("submit", {
                url:"updRole",
                onSubmit: function(){
                    // 做一些检查
                },
                success: function(data){
                    if(data==1){
                        $.messager.show({
                            title:'系统消息',
                            msg:'修改成功。',
                            timeout:3000,
                            showType:'slide'
                        });
                        // 关闭修改窗口
                        $('#role_dialog').dialog("close");
                        // 刷新表格中数据
                        $('#role_table').datagrid("reload");
                    }else{
                        $.messager.alert('系统消息','修改失败，请重新修改');
                    }
                }

            })
        });
    });
</script>

<form action="" method="post" id="role_edit_form">
    <input type="hidden" name="id"/>
    <table>
        <tr>
            <td>角色名称:</td>
            <td><input type="text" name="name"/> </td>
        </tr>
        <tr>
            <td>角色排序:</td>
            <td><input type="text" name="sort"/> </td>
        </tr>
        <tr>
            <td>角色备注:</td>
            <td><input type="text" name="remark"/> </td>
        </tr>
        <tr>
            <td colspan="2">
                <a id="role_edit_submit" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">修改</a>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
